package org.bsplus.client.gin;

import com.google.gwt.inject.client.AbstractGinModule;
import net.customware.gwt.presenter.client.DefaultEventBus;
import net.customware.gwt.presenter.client.EventBus;
import org.bsplus.client.mvp.CreateIssuePresenter;
import org.bsplus.client.mvp.CreateIssueView;
import org.bsplus.client.mvp.ListIssuePresenter;
import org.bsplus.client.mvp.ListIssueView;
import org.bsplus.client.mvp.MainPresenter;
import org.bsplus.client.mvp.MainView;

public class BSPlusGinModule extends AbstractGinModule
{
    @Override
    protected void configure() 
    {
        bind(EventBus.class).to(DefaultEventBus.class);

        bind(MainPresenter.class).asEagerSingleton();
        bind(MainPresenter.Display.class).to(MainView.class);

        bind(CreateIssuePresenter.class).asEagerSingleton();
        bind(CreateIssuePresenter.Display.class).to(CreateIssueView.class);

        bind(ListIssuePresenter.class).asEagerSingleton();
        bind(ListIssuePresenter.Display.class).to(ListIssueView.class);


    }
}
